Concurrency identification for processing of multistage workflows

ABSTRACT

A system and method may be utilized to identify concurrency levels of processing stages in a distributed system, identify common resources and bottlenecks in the distributed system using the identified concurrency levels, and allocate resources in the distributed system using the identified concurrency levels.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of U.S. application Ser.No. 13/623,968, filed on Sep. 21, 2012, the disclosure of which isincorporated by reference herein in its entirety.

BACKGROUND

1. Technical Field

The present disclosure relates to identifying concurrency levels ofprocessing stages in a distributed system, and more particularly, to asystem and method for identifying concurrency levels of processingstages in a distributed system, and using the identified concurrencylevels to identify common resources and bottlenecks in the system, andallocate resources in the system.

2. Discussion of Related Art

A distributed system includes a plurality of job requests that traversemultiple processing stages prior to completion. A processing stage maycorrespond to, for example, a function or method call in the source codeof a computer application. Each processing stage may be handled by oneor more computers in the distributed system. The job requests may beprocessed in parallel at each processing stage based on the concurrencylevel of each respective stage. The concurrency level of a processingstage refers to the maximum number of job requests that the system canprocess at that stage at the same time. When the concurrency level at aprocessing stage is one, all jobs at that stage will be processed insequential order. A stage having a limited concurrency level may act asa bottleneck that negatively impacts the performance of the system.

A limited concurrency level may be caused by a limited resource(s) in asystem, or may be the result of the use of locks in a system. Locking,which is common in systems such as database systems, may be utilized toensure the proper execution of job requests. Identifying operations in asystem that result in limited concurrency levels, such as locking, mayaid in improving the performance of a distributed system.

BRIEF SUMMARY

According to an exemplary embodiment of the present disclosure, a methodof identifying a concurrency level of a first processing stage from aplurality of processing stages in a distributed system includesreceiving measurement data indicating a starting time and an ending timeof the first processing stage in each of a plurality of job requests,sorting, by a processor, the measurement data in an increasing timeorder, storing the sorted measurement data in a concurrencydetermination database, traversing the sorted measurement data beginningwith a first portion of the measurement data having an earliest time,and ending with a last portion of the measurement data having a latesttime, increasing the concurrency level, by the processor, upondetermining that a current portion of the measurement data indicates astarting time of the first processing stage, decreasing the concurrencylevel, by the processor, upon determining that the current portion ofthe measurement data indicates an ending time of the first processingstage, and outputting a maximum concurrency level of the firstprocessing stage equal to a largest value of the concurrency level.

In an exemplary embodiment, the method further includes comparing themaximum concurrency level of the first processing stage to a maximumconcurrency level of a second processing stage, classifying a resourceserving at least one of the first and second processing stages as adedicated resource upon determining that the maximum concurrency levelof the first processing stage is not equal to the maximum concurrencylevel of the second processing stage, and classifying the resource as ashared resource the upon determining that the maximum concurrency levelof the first processing stage is equal to the maximum concurrency levelof the second processing stage. The dedicated resource is capable ofserving one of the first and second processing stages, and the sharedresource is capable of serving both the first and second processingstages.

In an exemplary embodiment, the method further includes identifying,from a plurality of resources, dedicated resources capable of servingone processing stage from the plurality of processing stages, and commonresources capable of serving more than one processing stage from theplurality of processing stages, allocating the dedicated resources tothe plurality of processing stages as the processing stages arrive, andallocating the common resources to the plurality of processing stages asthe processing stages arrive, upon determining that the dedicatedresources are unavailable. The common resources are allocated in anorder of common resources capable of serving a fewest number ofprocessing stages to common resources capable of serving a largestnumber of processing stages.

In an exemplary embodiment, a system for identifying a concurrency levelof a first processing stage from a plurality of processing stages in adistributed system includes an interface unit, a concurrencydetermination unit, and a concurrency determination database. Theinterface unit is configured to receive measurement data indicating astarting time and an ending time of the first processing stage in eachof a plurality of job requests. The concurrency determination unit isconfigured to sort the measurement data in an increasing time order. Theconcurrency determination database is configured to store the sortedmeasurement data. The concurrency determination unit is furtherconfigured to traverse the sorted measurement data beginning with afirst portion of the measurement data having an earliest time, andending with a last portion of the measurement data having a latest time,increase the concurrency level upon determining that a current portionof the measurement data indicates a starting time of the firstprocessing stage, and decrease the concurrency level upon determiningthat the current portion of the measurement data indicates an endingtime of the first processing stage. The interface unit is furtherconfigured to output a maximum concurrency level of the first processingstage equal to a largest value of the concurrency level.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

Exemplary embodiments of the present disclosure will be described belowin more detail, with reference to the accompanying drawings:

FIG. 1A shows a job request including six processing stages, s1 thoughs6, in a distributed system, according to an exemplary embodiment of thepresent disclosure.

FIG. 1B shows a concurrency determination unit interfaced with adistributed system, according to an exemplary embodiment of the presentdisclosure.

FIGS. 2A to 2C show a plurality of job requests including the processingstages of FIG. 1 ordered based on different criteria, according to anexemplary embodiment of the present disclosure.

FIG. 3 shows graphs representing the concurrency level as a function oftime for each of the processing stages s1 to s6 shown in FIGS. 2A to 2C,according to an exemplary embodiment of the present disclosure.

FIG. 4 is a flowchart showing a method for determining the respectivemaximum concurrency levels of the processing stages shown in FIG. 3,according to an exemplary embodiment.

FIGS. 5A to 5C show different distributed systems including tworesources and two processing stages s1 and s2, according to an exemplaryembodiment of the present disclosure.

FIG. 5D is an illustration showing the relationship between theprocessing stages shown in FIG. 5C.

FIG. 6 shows an example of a system having three processing stages and aplurality of resources, according to an exemplary embodiment of thepresent disclosure.

FIG. 7 is a computer system for identifying concurrency levels ofprocessing stages in a distributed system, and utilizing the identifiedconcurrency levels to identify common resources and bottlenecks in thesystem, and allocate resources in the system, according to an exemplaryembodiment of the present disclosure.

DETAILED DESCRIPTION

A workflow (e.g., a business process workflow) corresponds to theprocessing of job requests in a system. The system may be, for example,a distributed processing system such as a business process managementsystem, a transaction processing system, an information/data streamprocessing system, a management and provisioning system, a virtualmachine (VM) provisioning system used for various cloud based services,or a multi-thread application system. The job request may be, forexample, a web request, a user request, or a VM provisioning request. Ajob request may include a plurality of processing stages. In a complexsystem, several hundred processing stages may be included for each jobrequest, and thousands of requests may be handled simultaneously.

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present disclosure may take theform of an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Exemplary embodiments of the present disclosure are described below withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the disclosure. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 1A shows a job request including six processing stages, s1 thoughs6. The patterns representing the processing stages s1 through s6 areused to represent the same processing stages in FIGS. 2A to 2C. Multiplejob requests may be simultaneously processed at each processing stage(e.g., each processing stage may correspond to a pool of threads for acertain task). The processing stages of a job request may be executedsequentially or concurrently. Although there is no actual limit to thenumber of concurrent requests executed at each stage, executing a highnumber of concurrent requests at a stage may result in lockingbehaviors, which can lead to a limited concurrency level at certainstages. According to exemplary embodiments of the present disclosure,these limiting stages may be detected by observing the job requestsoccurring in a system during normal operation, collecting measurementdata, and analyzing the measurement data to identify the processingstage(s) having a limited concurrency level.

Certain resources available in a distributed system may be capable ofserving different processing stages in the system. Resources mayinclude, for example, processor cores, processor threads, memory,storage space or network bandwidth.

Various types of relevant measurement data spanning from the operatingsystem level to the application level in a distributed system may becollected. In certain systems, this relevant measurement data is notdirectly available as a result of the different levels of abstraction inthe application, middleware, and operating system levels. For example,the relevant resources used for handling high-level user requests andbusiness workflows in a system may not be directly identifiable, sincethe operating system and middleware levels may not be informed of whichprocessing stage is being served at a given time. According to exemplaryembodiments, when timing data is not directly available from the system,the timing data provided at the application level may be measured. Oncemeasured, the timing data may be used to obtain information regardingthe operation of the system. For example, for each job request in asystem, timestamps indicating the beginning and end of each processingstage in the job request may be collected. These timestamps may beanalyzed to identify the concurrency level of the processing stages in ajob request. Once the concurrency levels of all processing stages havebeen identified, the processing stage(s) acting as the bottleneck of thesystem may be identified.

FIG. 1B shows a concurrency determination unit 101 interfaced with adistributed system 102 via an interface unit 104. The concurrencydetermination unit 101 may include at least some of the components shownin the computer system 701 of FIG. 7. Once interfaced with thedistributed system 102, the concurrency determination unit 101 mayreceive various types of information from the system 102 via theinterface unit 104. For example, the concurrency determination unit 101may receive the measurement data described above from the distributedsystem 102. The concurrency determination unit 101 may further receiveresource data corresponding to the resources of the distributed system102. The data received by the concurrency determination unit 101 may bestored in a concurrency determination database 103.

FIGS. 2A to 2C show a plurality of job requests including processingstages s1 to s6 from a distributed system ordered based on differentcriteria. There may be a high degree of randomness regarding the arrivaltime, processing time, and completion time of the processing stages inthe job requests. For example, in certain instances, an earlierprocessing stage may or may not complete before a subsequent processingstage arrives. That is, a first processing stage may arrive before asecond processing stage arrives, and the second processing stage maycomplete before the first processing stage completes. Determiningpatterns of the processing stages can allow for the identification ofthe respective maximum concurrency levels of the processing stages.Determining patterns may be accomplished by arranging the job requestsin a number of different groupings based on different criteria.

For example, in FIG. 2A, six job requests are ordered based on thearrival time of the first processing stage s1. That is, the job requestsare ordered based on the order that each job request begins processingthe first processing stage s1. In FIG. 2B, the job requests are orderedbased on the arrival time of the fourth processing stage s4. The jobrequests may continue to be arranged in additional groupings based ondifferent criteria such as, for example, the arrival time of the secondprocessing stage s2, third processing stage s3, fifth processing stages5, or sixth processing stage s6. Analyzing a large number of groupingsincreases the probability of identifying patterns that may be used todetermine the maximum concurrency levels of the processing stages.

Analyzing the grouping shown in FIG. 2B indicates that a pattern existsbased on the arrival time of the fourth processing stage s4. In light ofthis pattern, the job requests may be arranged in different groups. Forexample, in FIG. 2C, the job requests are arranged in two groups basedon the fourth processing stage s4. As shown in FIG. 2C, the fourthprocessing stage s4 is not processed concurrently within each respectivegroup. That is, in the first group, each instance of the fourthprocessing stage s4 completes before another instance of the fourthprocessing stage s4 arrives. Similarly, in the second group, eachinstance of the fourth processing stage s4 completes before anotherinstance of the fourth processing stage s4 arrives. Thus, in the six jobrequests shown in FIGS. 2A-2C, no more than two instances of the fourthprocessing stage s4 are running concurrently, and the maximumconcurrency level for the fourth processing stage s4 is therefore two.As a result, only a minimum of two resources capable of serving thefourth processing stage s4 are required for the six job requests. Forexample, a first resource can serve the fourth processing stage s4 inthe first group, and a second resource can serve the fourth processingstage s4 in the second group.

Generating various groupings based on various patterns, as describedabove with reference to FIGS. 2A-2C, allows for the determination of themaximum concurrency level for each processing stage in a plurality ofjob requests, as shown in FIG. 3. FIG. 3 shows graphs representing theconcurrency level as a function of time for each of the processingstages s1 to s6 shown in FIGS. 2A to 2C. The height of the line in thegraphs of FIG. 3 corresponds to the number of concurrent instances ofthe respective processing stages at a given time. For example, eachgraph begins at zero, corresponding to a time when no job requests areactive. Once a processing stage arrives in a job request, the line ofthe corresponding graph increases by one. Similarly, once a processingstage finishes in a job request, the line of the corresponding graphdecreases by one. As a result, the graphs indicate how many resourcesare required for each processing stage at a given time. The maximumvalue (e.g., height) of the line of each graph represents the maximumconcurrency level for the corresponding processing stage. For example,as shown in FIG. 3, the maximum concurrency level for the first throughthird processing stages s1 through s3 is four, respectively, the maximumconcurrency level for the fourth processing stage s4 is two, the maximumconcurrency level for the fifth processing stage s5 is four, and themaximum concurrency level for the sixth processing stage s6 is three.Once the maximum concurrency level for each processing stage has beendetermined, the processing stage acting as the bottleneck in the systemmay be identified.

FIG. 4 is a flowchart showing a method for determining the respectivemaximum concurrency levels of the processing stages shown in FIG. 3,according to an exemplary embodiment.

As described above, in exemplary embodiments, the measurement datareceived from a distributed system may include timestamps indicating thebeginning and end of each processing stage in a job request.Identification of all timestamps T_s allows the plurality of jobrequests to be ordered, as shown in FIGS. 2A to 2C. The timestamps T_smay be used to determine the maximum concurrency level max_Concurr_s foreach stage s. That is, the maximum concurrency level for each stage smay be determined by selecting, ordering, and analyzing all timestampsfor a plurality of jobs in a system. For I job requests having S stagessubmitted in a system, T(i,s,begin) represents a timestamp correspondingto when the system starts processing stage s for the i′th request, andT(i,s,end) represents a timestamp corresponding to when the systemfinishes processing stage s for the i′th request, wherein i=1, . . . ,I, and s=1, . . . , S. In an exemplary embodiment, the timestamps may beobtained from a globally synchronized time source. If the timestamps areinstead obtained from different unsynchronized clocks, clocksynchronization mechanisms may be utilized.

At block 401, all of the timestamps T_s are obtained for a givenprocessing stage s, where:T _(—) s={T(i,s,begin) and T(i,s,end) |i=1, . . . I}Once selected, the timestamps T_s are sorted in increasing order atblock 402. The entire timeline is then scanned from the beginning of alltrace data (Tmin) to the end of all trace data (Tmax), where:Tmin=min{T(i,s,begin) and T(i,s,end) |i=1, . . . , I; s=1, . . . , S}Tmax=max{T(i,s,begin) and T(i,s,end) |i=1, . . . , I; s=1, . . . , S}Initially, when the scanning begins:Concurrency_(—) s(Tmin)=0prev_timestamp=Tmin−1max_Concurrency_s=0At block 403, the next timestamp next_timestamp from the sorted list oftimestamps T_s is selected. At block 404, it is determined whether thenext timestamp next_timestamp corresponds to the beginning of theprocessing stage s or the end of the processing stage s. If the nexttimestamp next_timestamp corresponds to the beginning of the processingstage s, the method proceeds to block 405, and:concurrency_(—) s(next_timestamp)=concurrency_(—) s(prev_timestamp)+1Referring to FIG. 3, block 405 corresponds to increasing the observedconcurrency level of the processing stage s by one (e.g., the height ofthe line in the graph is increased by one). At block 404, if the nexttimestamp next_timestamp corresponds to the end of the processing stages, the method proceeds to block 406, and:concurrency_(—) s(next_timestamp)=concurrency_(—) s(prev_timestamp)−1Referring To FIG. 3, block 406 corresponds to decreasing the observedconcurrency level of the processing stage s by one (e.g., the height ofthe line in the graph is decreased by one). At a given time, the numberof concurrent instances of the processing stage s is:

max_Concurrency_s = max {max_Concurrency_s, concurrency_s(next_timestamp)}The previous timestamp prev_timestamp is then set to the next timestampnext_timestamp:prev_timestamp=next_timestampAt block 407, the maximum concurrency level is set. Initially, themaximum concurrency level is set to zero. At block 407, if the observedconcurrency level was previously increased by one at block 405, themaximum concurrency level is increased by one. Alternatively, if theobserved concurrency level was previously decreased by one at block 406,the maximum concurrency level is not changed. Blocks 403 to 407 arerepeated until all timestamps in the sorted list of timestamps T_s havebeen scanned (see block 408). Referring to FIG. 1B, the measurement datamay be received by the concurrency determination unit 101 from thedistributed system 102 via the interface unit 104, and may be stored,sorted, and analyzed utilizing the concurrency determination unit 101and the concurrency determination database 103.

Once the scanning process has been completed, the stage bottleneck maybe identified. For example, the processing stage having the minimumachieved maximum concurrency max_Concurrency_s may be identified as thestage bottleneck. The stage bottleneck is the most constrained stage interms of achieved concurrency level in the system. When the system isunder a high load, this stage may negatively affect the system'sperformance. Improving execution at this stage may result in animprovement in the overall system performance.

Using the scanning process described with reference to FIG. 4, thetime-weighted average concurrency level for each stage ave_Concurrency_smay also be calculated. A small gap between ave_Concurrency_s andmax_Concurrency_s for each stage s indicates that the current stage hasbeen operating at its capacity for a significant amount of time, andthus, may be acting as a bottleneck stage.

In addition to evaluating the concurrency level for each processingstage s in isolation, as described above, exemplary embodiments of thepresent disclosure may evaluate processing stages that share a commonresource pool. For example, in an application server environment, athread pool with a pre-set number of threads can be set up to serverequests at different stages of processing. In this environment, viewingeach processing stage in isolation may not result in an accurateidentification of the bottleneck of the system. In a system includingshared resources, certain resources may be capable of serving only asingle processing stage, and other resources may be capable of servingmultiple processing stages. For example, referring to FIGS. 1-3, a firstresource may be capable of serving the first processing stage s1, asecond resource may be capable of serving the second processing stages2, and a third resource may be capable of serving both the first andsecond processing stages s1 and s2.

To accurately identify the bottleneck of a distributed system sharingcommon resources, the system is observed for an amount of time allowingall possible combinations of processing stages and resources (e.g.,threads, processes) to be observed. The observed maximum concurrencylevel max_Concurr_s is the actual limit of the system. In a givensystem, some processing stages may not share the same resource(s), someprocessing stages may share the same resource(s), and some processingstages may have a dedicated resource(s) and also share a commonresource(s).

Identifying which resources are common resources and which resources arededicated resources allows the resources to be assigned to theprocessing stages in a manner that increases performance and decreasessystem bottlenecks. This identification may be made by observing adistributed system at various times and identifying which resources mayserve which processing stages. That is, if a system is observed for asufficient period of time, the structure of the system, including whichresources are capable of serving which processing stages, may bedetermined. For example, observing a system for a sufficient period oftime allows for the determination of which resources are dedicatedresources, and which resources are common resources shared amongmultiple processing stages. Referring to FIG. 1B, the concurrencydetermination unit 101 may be utilized to observe the distributed system102, and may receive input representing the observed resource behaviorvia the interface unit 104.

FIGS. 5A to 5C show different distributed systems including tworesources and two processing stages s1 and s2. In FIGS. 5A to 5C, afirst resource is represented by diagonal lines and a second resource isrepresented by a solid shade.

Referring to FIG. 5A, processing stages s1 and s2 do not share the sameresource pool. When processing stages s1 and s2 do not share the sameresource pool, the first resource is capable of serving only processingstage s1, and the second resource is capable of serving only processingstage s2. Thus, when observed over a period of time, the system in FIG.5A will always show the first resource serving the first processingstages s1, and the second resource serving the second processing stages2. In this case:max_Concurr_(—) {s1,s2}=max_Concurr_(—) {s1}+max_Concurr_(—) {s2}Thus, in FIG. 5A, max_Concurr_{s1,s2}=7, max_Concurr_{s1}=4, andmax_Concurr_{s2}=3.

In FIG. 5B, processing stages s1 and s2 share the same resource pool.When the processing stages share the same resource pool, the resourcesare capable of serving both the first processing stage s1 and the secondprocessing stage s2. Thus, when observed over a period of time, thesystem in FIG. 5B will show different combinations of the two resourcesserving both the first processing stage s1 and the second processingstage s2. For example, in the first observation of FIG. 5B, the firstresource and the second resource split between serving the first andsecond processing stages s1 and s2. In the second observation of FIG.5B, all of the processing stages are served only by the first resource.In the third observation of FIG. 5B, all of the processing stages areserved only by the second resource. When processing stages s1 and s2share the same resource pool:max_Concurr_{s1,s2}=max_Concurr_{s1}=max_Concurr_{s2}Thus, in FIG. 5B, max_Concurr_{s1,s2}=7, max_Concurr_{s1}=7, andmax_Concurr_{s2}=7. Observing the behavior of FIGS. 5A and 5B allows forthe identification of which resources are shared resources.

In FIG. 5C, processing stages s1 and s2 each have a dedicated resourcepool and also share a common resource pool. That is, in FIG. 5C, someresources are capable of only serving the first processing stage s1,some resources are capable of only serving the second processing stages2, and some resources are capable of serving both the first and secondprocessing stages s1 and s2. In the first observation of FIG. 5C, thecommon resources are mixed between the first processing stage s1 and thesecond processing stage s2. In the second observation of FIG. 5C, all ofthe resources capable of serving the first processing stage s1 areassigned to the first processing stage s1. In the third observation ofFIG. 5C, all of the resources capable of serving the second processingstage s2 are assigned to the second processing stage s2. Observing thesedifferent scenarios allows for the identification of which resources arededicated resources and which resources are shared resources. Whenprocessing stages s1 and s2 each have a dedicated resource pool and alsoshare a third, common resource pool:max{max_Concurr_(—) {s1},max_Concurr_(—) {s2}}<max_Concurr_(—){s1,s2}<max_Concurr_(—) {s1}+max_Concurr_(—) {s2}Thus, in FIG. 5C, max{max_Concurr_{s1},max_Concurr_{s2}}={10, 9},max_Concurr_{s1,s2}={12}, and max_Concurr_{s1}+max_Concurr_{s2}=10+9.This relationship between the resources and the processing stages, whichwas identified by observing the system at various points of time, may berepresented as shown in FIG. 5D. FIG. 5D indicates that three of thefirst resources are capable of only serving the first processing stages1, two of the second resources are capable of only serving the secondprocessing stage s2, and seven of the first and second resources arecapable of serving both the first and second processing stages s1 ands2.

FIG. 6 is a visual representation of a system having three processingstages A, B and C, and a plurality of resources f100, f010, f001, f110,f101, f011 and f111. Referring to FIG. 6, f(A) indicates the resourcescapable of performing processing stage A, f(B) indicates the resourcescapable of performing processing stage B, and f(C) indicates theresources capable of performing processing stage C. Thus, referring toFIG. 6:ƒ(A)=max_Concurr_(—) A=ƒ100+ƒ101+ƒ110+ƒ111ƒ(B)=max_Concurr_(—) B=ƒ010+ƒ011+ƒ110+ƒ111ƒ(C)=max_Concurr_(—) C=ƒ001+ƒ011+ƒ101+ƒ111Further, in FIG. 6, multiple processing stages may be consideredtogether. For example, all of the resources capable of performingprocessing stages A and B, processing stages B and C, processing stagesC and A, and processing stages A, B and C may be considered. Thus,referring to FIG. 6:

f(A⋃B) = max_Concurr_(A, B) = f 100 + f 010 + f 110 + f 101 + f 011 + f 111f(A⋃B) = max_Concurr_(B, C) = f 010 + f 001 + f 110 + f 101 + f 011 + f 111f(C⋃A) = max_Concurr_(C, A) = f 001 + f 100 + f 110 + f 101 + f 011 + f 111f(A⋃B⋃C) = max_Concurr(A, B, C) = f 001 + f 010 + f 110+ 101 + f 011 + f 111The functions listed above indicate which resources are capable ofserving which processing stages, however, the functions do not indicatewhich resources are dedicated resources, and which resources are commonresources. That is, the functions do not indicate which resources arecapable of only serving one of processing stages A, B, and C, and whichresources are capable of serving more than one of processing stages A,B, and C. Identifying which resources are dedicated resources and whichresources are common resources may be accomplished by obtaining thesolutions for the above functions:ƒ100=ƒ(A∪B∪C)−ƒ(B∪C)ƒ010=ƒ(A∪B∪C)−ƒ(C∪A)ƒ001=ƒ(A∪B∪C)−ƒ(A∪B)ƒ110=ƒ(A∪B)−ƒ100−ƒ010−ƒ(C)+ƒ001ƒ011=ƒ(B∪C)−ƒ010−ƒ001−ƒ(A)+ƒ100ƒ101=ƒ(C∪A)−ƒ001−ƒ100−ƒ(B)+ƒ010ƒ111=ƒ(A)+ƒ(B)−ƒ(A∪B)−ƒ110Although the exemplary embodiment described above includes threeprocessing stages and seven resources, exemplary embodiments of thepresent disclosure are not limited thereto. To determine the values ofthe resources, the single dedicated resources ƒ(e_i) are first computed,where e_i is the i^(th) unit vector, the i^(th) dimension is 1, andother dimensions are 0. The following equation corresponds to ƒ(A),ƒ(B), and ƒ(C), as shown above:ƒ(e _(—) i)=ƒ(Ω−f(Ω−{i}))The original values of ƒ(A) for each set A may then be reduced such thatf1(A)=f(A)−\sum_{i\in A} f(e_i), where f1(A) correspond to all of theresources dedicated to serve A that are shared by at least 2 stages.Performing this update removes the single dedicated resource from thefunction f(x). The dedicated resource f(e_ij) that serves only stage iand j is then computed, where:f(e _(—) ij)=f1({i,j})−f1(Ω−{i,j})The values of f1(A) are then reduced to obtain:f2(A)=f1(A)−\sum_(—) {i,j\in A} f1(e _(—) ij)This process is repeated to compute the dedicated resource that onlyserves three stages, and the entire procedure is repeated until thevalues of all resources are computed.

When observing a distributed system, it is possible that less than everycombination of the system state in the system has been observed. As aresult, the observed concurrency values may be less than the actualmaximum concurrency values in the system. Further, systems that havemore dedicated pools of resources than shared pools of resources mayresult in a high number of disjoint sets (e.g., many intersections mayhave 0 values). A disjoint set corresponds to resources that are onlycapable of serving one processing stage, or a relatively low number ofprocessing stages. In response, the randomness of the system may bedetermined using, for example, Poisson distribution, indicating thelikelihood that every possible combination of resources has beenobserved.

When the number of processing stages in a distributed system is large,determining all of the shared resources may be a complex undertaking.However, systems having a large number of processing stages often havemany dedicated resource pools that handle most of the processing stages.In an exemplary embodiment, consecutive processing stages may beidentified and merged into a combined stage to reduce the complexitywhen observing the system. For example, neighboring processing stages s1and s2 may be combined when all resources capable of serving processingstage s1 may also serve processing stage s2, and vice versa. Forexample, when:max_Concurr_{s1,s2}=max_Concurr_{s1}=max_Concurr{s2},processing stages s1 and s2 may be merged together. When a system has alarge number of processing stages, there may be a number of differentways to share the resources of the system. Different resource sharingschemes may lead to different capacities of the system. In an exemplaryembodiment, the possible different resource sharing patterns may beidentified and evaluated, and the resource sharing pattern resulting inthe maximum capacity of the system may then be selected. Further,identifying each possible resource sharing pattern in a system allowsfor the identification of the bottleneck in the system when the systemis operating at maximum capacity.

In an exemplary embodiment, a steady stream of job requests arriving atthe system are observed to determine the maximum sustained throughput ofthe system. The throughput of the system, which is the same for allstages s, is equal to the average concurrency divided by the averageresidence time. For example, for each processing stage s:

${{average\_ throughput}{\_ s}} = {{\lambda\_ s} = \frac{{average\_ Concurr}{\_ s}}{{average\_ residence}{\_ time}{\_ s}}}$Identifying the throughput allows for the identification of systembottleneck(s), and in turn allows for the determination of whichresources should be assigned to which processing stages, and which typesof resources should be added to the system.

Once it has been determined that a distributed system includes at leastsome common resources, a determination must be made as to how the commonresources are to be shared among the processing stages the resources arecapable of serving. Different sharing schemes may lead to differentthroughput in the system. Thus, it is desirable to identify and select asharing scheme capable of increasing, or maximizing system throughput.

Referring to FIG. 6, the resources in the intersections are commonresources capable of serving the corresponding processing stages. Forexample, resource f111 is capable of serving processing stages A, B andC. The common resources may be defined based on the processing stagesthey are capable of serving. For example, resource f111 may be definedas f111_A, f111_B, and f111_C. Thus, referring to FIG. 6:ƒ111≧ƒ111_(—) A+ƒ111_(—) B+ƒ111_(—) Cƒ110≧ƒ110_(—) A+ƒ110_(—) Bƒ011≧ƒ011_(—) B+ƒ011_(—) Cƒ101≧ƒ101_(—) C+ƒ101_(—) CThe maximum throughput of a processing stage may be determined byassigning all resources capable of serving the processing stage to theprocessing stage, and observing the performance of the processing stagerelative to a time constraint representing the amount of time taken tocomplete the processing stage (e.g., T1 for processing stage A, T2 forprocessing stage B, and T3 for processing stage C). This procedure maybe performed for each processing stage in the system. For example, thethroughput of processing stages A, B and C are represented by thefollowing inequalities:

${Throughput\_ A} \leq \left( \frac{{f\; 100} + {f\; 110{\_ A}} + {f\; 101{\_ A}} + {f\; 111{\_ A}}}{T\; 1} \right)$${Throughput\_ B} \leq \left( \frac{{f\; 010} + {f\; 110{\_ B}} + {f\; 011{\_ B}} + {f\; 111{\_ B}}}{T\; 2} \right)$${Throughput\_ C} \leq \left( \frac{{f\; 001} + {f\; 101{\_ C}} + {f\; 011{\_ C}} + {f\; 111{\_ C}}}{T\; 3} \right)$The overall throughput of the system is equal to the lowest throughputvalue of processing stages A, B, and C. That is, the overall throughputof the system is limited by the processing stage having the lowestthroughput. For example:Overall_Throughput=min(Throughput_A, Throughput_B, Throughput_C)The maximum overall throughput of the system is subject to:Overall_Throughput<=Throughput_AOverall_Throughput<=Throughput_BOverall_Throughput<=Throughput_C

Thus, using the above optimization formula, the overall throughput ofthe system can be maximized. Solving the above inequalities indicateswhich stage(s) is the bottleneck stage(s), and thus, allows for adetermination to be made regarding the manner in which the commonresources are to be shared. Once a processing stage is identified as thebottleneck stage, all shared resources between the bottleneck stage andother stages may be allocated to the bottleneck stage. For example, ifprocessing stage B is the only bottleneck stage, all shared resourcesbetween stages A and B (e.g., resource f110), B and C (e.g., resourcef011), and A, B and C (e.g., resources f110 and f111) may be allocatedto stage B (e.g., f110_A=f011_C=f111_A=f111_C=0). Further, if it ispossible to add additional resources to the system, resources capable ofserving the bottleneck stage(s) may be added, and as a result, theoverall system capacity may be improved.

A variety of scheduling policies may be implemented during resourceallocation, according to exemplary embodiments. For example, referringto FIG. 6, when processing stage B arrives at a job, resources capableof only serving processing stage B (e.g., dedicated resources) are firstallocated to processing stage B. If none of these dedicated resourcesare available, resources capable of only serving two processing stagesare next allocated to processing stage B. For example, resource f110(e.g., resource f110_B) or resource f011 (e.g., resource f011_B) arenext allocated. If these resources are unavailable, resources capable ofserving all of processing stages A, B, and C are allocated to processingstage B. For example, resource f111 (e.g., resource f111_B) is nextassigned to processing stage B. Such a scheduling policy may increase,or maximize the system throughput.

The flowcharts and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowcharts or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

More particularly, referring to FIG. 7, according to an exemplaryembodiment of the present disclosure, a computer system 701 foridentifying the concurrency levels of processing stages in a distributedsystem, and utilizing the identified concurrency levels to identifycommon resources and bottlenecks in the system, and allocate resourcesin the system, can comprise, inter glia, a central processing unit (CPU)702, a memory 703 and an input/output (I/O) interface 704. The computersystem 701 is generally coupled through the I/O interface 704 to adisplay 705 and various input devices 706 such as a mouse and keyboard.The support circuits can include circuits such as cache, power supplies,clock circuits, and a communications bus. The memory 703 can includerandom access memory (RAM), read only memory (ROM), disk drive, tapedrive, etc., or a combination thereof. Embodiments of the presentdisclosure may be implemented as a routine 707 stored in memory 703(e.g., a non-transitory computer-readable storage medium) and executedby the CPU 702 to process the signal from the signal source 708. Assuch, the computer system 701 is a general-purpose computer system thatbecomes a specific purpose computer system when executing the routine707 of the present disclosure.

The computer platform 701 also includes an operating system andmicro-instruction code. The various processes and functions describedherein may either be part of the micro-instruction code or part of theapplication program (or a combination thereof) which is executed via theoperating system. In addition, various other peripheral devices may beconnected to the computer platform such as an additional data storagedevice and a printing device.

Having described exemplary embodiments for identifying the concurrencylevels of processing stages in a distributed system, and utilizing theidentified concurrency levels to identify common resources andbottlenecks in the system, and allocate resources in the system, it isnoted that modifications and variations can be made by persons skilledin the art in light of the above teachings. It is therefore to beunderstood that changes may be made in exemplary embodiments of thedisclosure, which are within the scope and spirit of the disclosure asdefined by the appended claims. Having thus described exemplaryembodiments of the disclosure with the details and particularityrequired by the patent laws, what is claimed and desired protected byLetters Patent is set forth in the appended claims.

What is claimed is:
 1. A system for identifying a maximum concurrencylevel of a first processing stage of a plurality of processing stages ina distributed system, comprising: an interface unit configured toreceive measurement data indicating a starting time and an ending timeof the first processing stage for each of a plurality of job requests; aconcurrency determination unit comprising a processor and a memory andconfigured to sort the measurement data in an increasing arrival timeorder; and a concurrency determination database configured to store thesorted measurement data, wherein the concurrency determination unit isfurther configured to initialize an observed concurrency level and themaximum concurrency level of the first processing stage to zero,traverse the sorted measurement data beginning with a first portion ofthe measurement data having an earliest starting time, increase theobserved concurrency level upon determining that a current portion ofthe measurement data indicates a starting time of the first processingstage for one or more of the job requests, decrease the observedconcurrency level upon determining that the current portion of themeasurement data indicates an ending time of the first processing stagefor one or more of the job requests, and increase the maximumconcurrency level if the observed concurrency level was increased,wherein the interface unit is further configured to output the maximumconcurrency level of the first processing stage for the plurality of jobrequests upon determining that the current portion of the measurementdata indicates a last portion of the measurement data having the latestending time, wherein the maximum concurrency level of a processing stagerefers to a maximum number of job requests that the system can processat that stage at the same time.
 2. The system of claim 1, wherein theinterface unit is further configured to receive a plurality oftimestamps as the measurement data, and each timestamp corresponds to anarrival time or a completion time of the first processing stage, or anarrival time or a completion time of another one of the plurality ofprocessing stages.
 3. The system of claim 1, wherein the concurrencydetermination unit is further configured to generate a plurality ofsorted orders of the plurality of job requests, wherein each of theplurality of sorted orders is based on an arrival time of a differentprocessing stage from the plurality of processing stages, and identify apattern based on the arrival time and a completion time of each of theplurality of processing stages in the plurality of sorted orders.
 4. Thesystem of claim 1, wherein the concurrency determination unit is furtherconfigured to compare the maximum concurrency level of the firstprocessing stage to a maximum concurrency level of a second processingstage, classify a resource serving at least one of the first and secondprocessing stages as a dedicated resource upon determining that themaximum concurrency level of the first processing stage is not equal tothe maximum concurrency level of the second processing stage, andclassify the resource as a shared resource upon determining that themaximum concurrency level of the first processing stage is equal to themaximum concurrency level of the second processing stage, wherein thededicated resource is capable of serving one of the first and secondprocessing stages, and the shared resource is capable of serving boththe first and second processing stages.
 5. The system of claim 1,wherein the concurrency determination unit is further configured toidentify a bottleneck stage corresponding to a processing stage from theplurality of processing stages, identify, from a plurality of resources,dedicated resources capable of serving one processing stage from theplurality of processing stages, and common resources capable of servingmore than one processing stage from the plurality of processing stages,and allocate common resources capable of serving the bottleneck stage tothe bottleneck stage.
 6. The system of claim 1, wherein the concurrencydetermination unit is further configured to identify, from a pluralityof resources, dedicated resources capable of serving one processingstage from the plurality of processing stages, and common resourcescapable of serving more than one processing stage from the plurality ofprocessing stages, allocate all common resources capable of serving eachprocessing stage for each of the plurality of processing stages,calculate a maximum throughput for each of the plurality of processingstages while all common resources are assigned to each respectiveprocessing stage, identify a bottleneck based on the maximum throughputcalculated for each of the plurality of processing stages, and allocateall common resources to the bottleneck stage.
 7. The system of claim 1,wherein the concurrency determination unit is further configured todetermine a maximum concurrency level of each of the plurality ofprocessing stages and identify a system bottleneck, wherein the systembottleneck corresponds to a processing stage from the plurality ofprocessing stages having a lowest maximum concurrency level.
 8. Thesystem of claim 1, wherein the concurrency determination unit is furtherconfigured to determine a maximum concurrency level of each of theplurality of processing stages and identify a system bottleneck, whereinthe system bottleneck corresponds to a processing stage from theplurality of processing stages having a lowest maximum concurrencylevel.
 9. The system of claim 1, wherein the concurrency determinationunit is further configured to determine a maximum concurrency level ofeach of the plurality of processing stages, determine a time-weightedaverage concurrency level of each of the plurality of processing stages,and identify a system bottleneck, wherein the system bottleneckcorresponds to a processing stage from the plurality of processingstages having a smallest difference between its corresponding maximumconcurrency level and its corresponding time-weighted averageconcurrency level.
 10. The system of claim 1, wherein the concurrencydetermination unit is further configured to identify, from a pluralityof resources, dedicated resources capable of serving one processingstage from the plurality of processing stages, and common resourcescapable of serving more than one processing stage from the plurality ofprocessing stages, allocate the dedicated resources to the plurality ofprocessing stages as the processing stages arrive, and allocate thecommon resources to the plurality of processing stages as the processingstages arrive, upon determining that the dedicated resources areunavailable, wherein the common resources are allocated in an order ofcommon resources capable of serving a fewest number of processing stagesto common resources capable of serving a largest number of processingstages.
 11. The system of claim 1, wherein the concurrency determinationunit is further configured to determine a maximum concurrency level ofeach of the plurality of processing stages, identify consecutiveprocessing stages from the plurality of processing stages, and combinethe consecutive processing stages into a single processing stage upondetermining that the maximum concurrency level of each of the respectiveconsecutive processing stages are equal to each other.